//
// Created by harrybao on 2019/4/3.
//

#pragma once

//#include <sys/time.h>
#include <ctime>
#include <chrono>

using std::chrono::high_resolution_clock;
using std::chrono::duration_cast;

class UtilTime
{
public:
    static void Init();

    static long long GetPassedSeconds();
    static long long GetPassedMilliseconds();
    static long long GetPassedMicroseconds();
    static long long GetDeltaSeconds();
    static long long GetDeltaMilliseconds();
    static long long GetDeltaMicroseconds();
private:
    static const std::chrono::time_point<high_resolution_clock> start_point_;
    static std::chrono::time_point<high_resolution_clock> pre_point_;
};

